import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import "./assets/css/restcss.css"
import "./assets/fonts/iconfont.css"

// 面包屑
import breadcrumb from "./components/Breadcrumb"
Vue.component("breadcrumb",breadcrumb)

Vue.config.productionTip = false

import http from "./http/request"
Vue.prototype.$http=http;

//导入vue-quill-editor（富文本编辑器）
import VueQuillEditor from 'vue-quill-editor'
//导入vue-quill-editor的样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

//全局注册富文本组件
Vue.use(VueQuillEditor)


//全局过滤器  Vue.filter("过滤器名称", (val)=>{})
Vue.filter("dateFormat", (val)=>{ //val要过滤的原始数据
    let date = new Date(val*1000);
    let y = date.getFullYear();
    let m = date.getMonth() + 1;
    let d = date.getDate();
    let hh = date.getHours();
    let mm = date.getMinutes();
    let ss = date.getSeconds();
    return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
});

import utils from "./utils"
Vue.prototype.$utils = utils;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
